<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ page import="java.util.ArrayList, linkeddataweb.professor.Professor" %>
<%@ page import="javax.servlet.http.HttpServlet" %>
<%@ page import="javax.servlet.http.HttpSession" %>
<% request.getSession(true); %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Researcher Profile</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">

<table>
  
  		<tr>
  			<td><a href="ProfessorRegister.jsp" title="Professor Register">Professor Sign up</a></td>
  			<td><a href="Search.jsp" title="Search for Researcher">Search</a></td>
    	</tr>

    	
    </table>

<% ArrayList<Professor> p = new ArrayList<Professor>();
  	p = (ArrayList<Professor>)session.getAttribute("professor");
  	
	if(p.size() == 0){
  		out.println("<h1 style=\"background-color:#eee\">No result found.</h1>");
  	}else{
  		for(int i=0; i < p.size(); i++){
   %>
   
   


  <div id="leftSide">

  <table>
  
  		<tr>
  			<td><img src="<%= p.get(i).getImage()  %>" alt="<%= p.get(i).getName()  %>" /></td>
  			<td><h1><%= p.get(i).getName()  %></h1></td>
    	</tr>

    	<tr>
    		<td>Citation Name:</td>
    		<td><%= p.get(i).getCitationName()  %></td>
    	</tr>
    	<tr>
    		<td>Address:</td>
    		<td><%= p.get(i).getAddress()  %></td>
    	</tr>
    	<tr>
    		<td>Email:</td>
    		<td><%=  p.get(i).getEmail()  %></td>
    	</tr>
    	<tr>
    		<td>University Name:</td>
    		<td><%=  p.get(i).getUniversityName()  %></td>
    	</tr>
    	<tr>
    		<td>Web Page:</td>
    		<td><a href="<%=  p.get(i).getWebpage()  %>" title="My web page">My web page</a></td>
    	</tr>
    	<tr>
    		<td>Lattes:</td>
    		<td><a href="<%=  p.get(i).getLattes()  %>" title="My Lattes curriculum">My Lattes curriculum</a></td>
    	</tr>
    	<tr>
    		<td>Higher Degree</td>
    		<td><%=  p.get(i).getHigherDegree()  %></a></td>
    	</tr>
    	<tr>
    		<td>Professional Area</td>
    		<td><%=  p.get(i).getProfissionalArea()  %></a></td>
    	</tr>
    	<tr>
    		<td>Recent Project</td>
    		<td><%=  p.get(i).getProject()  %></a></td>
    	</tr>
    	<tr>
    		<td>Last Project</td>
    		<td><%=  p.get(i).getPastProject()  %></a></td>
    	</tr>
    	<tr>
    		<td>Language 1</td>
    		<td><%=  p.get(i).getLanguages()[0]  %></a></td>
    	</tr>
    	<tr>
    		<td>Language 2</td>
    		<td><%=  p.get(i).getLanguages()[1]  %></a></td>
    	</tr>
    	<tr>
    		<td>Full Paper 1</td>
    		<td><%= p.get(i).getFullPapers()[0]  %></a></td>
    	</tr>
    	<tr>
    		<td>Full Paper 2</td>
    		<td><%= p.get(i).getFullPapers()[1]  %></a></td>
    	</tr>
    	<tr>
    		<td>Attended Event 1</td>
    		<td><%= p.get(i).getAttendedEvents()[0]  %></a></td>
    	</tr>
    	<tr>
    		<td>Attended Event 2</td>
    		<td><%= p.get(i).getAttendedEvents()[1]  %></a></td>
    	</tr>
    	<tr>
    		<td>Buddy 1</td>
    		<td><%= p.get(i).getKnows()[0]  %></a></td>
    	</tr>
    	<tr>
    		<td>Buddy 2</td>
    		<td><%= p.get(i).getKnows()[1]  %></a></td>
    	</tr>
    	
    </table>
    
    <% 		} //end for
  		}// end else
    %>
    
<div class="clear"></div>
	</fieldset>
  </div>

  
  <div class="clear"></div>
</div>
</body>
</html>